package org.smi.bt;

/**
 * @Author: ism
 * @Platform: Mac
 * @Date: 下午7:00 2018/7/2
 */
public class Bbt {

    private double data;
    private int bf;
    Bbt left;
    Bbt right;

    public Bbt(double data) {
        this.data = data;
        this.bf = 0;
        left = null;
        right = null;
    }

    public Bbt rotationRight(Bbt root) {
        Bbt left = root.left;
        root.left = left.right;
        left.right = root;

        return left;
    }
}
